<!-- 应收账款分析(珠江) -->
<template>
	<mostDrawer :isShow="isShow" :isReadOnly="isReadOnly" :handleType="handleType" :currentRow="currentRow" :tableHeaderList="tableHeaderList" @close="handleClose" :noFormatColNumList="[0, 1]" :rowClassName="rowClassName"></mostDrawer>
</template>

<script setup>
	import { ref } from 'vue';
	import { setOrder } from '@/utils/publicUtils';
	import mostDrawer from '../components/mostDrawer.vue';
	defineProps({
		isShow: { type: Boolean, default: false },
		isReadOnly: { type: Boolean, default: true },
		handleType: { type: String, default: '' },
		currentRow: { type: Object },
	});

	const emit = defineEmits(['close']);

	//关闭抽屉
	const handleClose = data => {
		emit('close', data);
	};

	let tableHeaderList = ref([
		{ label: '板块', isTxt: true },
		{ label: '应收科目', isTxt: true },
		{ label: '按板块及科目分类', width: 130, list: [{ label: '金额' }] },
		{
			label: '按清理性质分类',
			list: [{ label: '已移交诉讼' }, { label: '关联方' }, { label: '正常催缴款' }, { label: '其他' }],
		},
	]);

	//表格颜色
	const rowClassName = data => {
		if (data.rowIndex === 1) {
			return 'bg-color-eee2dd';
		}
		return '';
	};

	setOrder(tableHeaderList.value);
</script>
